﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="Wireless_Data_Transmission._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Wireless Data Transmission</title>

    <p style="color: #FFFFFF; font-size: xx-large; font-weight: bold;" 
        align="center">
        Wireless Data Transmitter</p>
    <p style="color: #FFFFFF; font-size: small" align="center">
        <asp:HyperLink ID="HyperLink1" runat="server" Font-Size="Small" 
            NavigateUrl="~/LiveValues.aspx">Live Values</asp:HyperLink>
    </p>
    <body bgcolor="#6699ff">


    <form id="form1" runat="server">
    Node:
    <asp:DropDownList ID="ddlNode" runat="server">
        <asp:ListItem></asp:ListItem>
        <asp:ListItem>1</asp:ListItem>
        <asp:ListItem>2</asp:ListItem>
        <asp:ListItem>3</asp:ListItem>
    </asp:DropDownList>
    <body>
        &nbsp;
        <asp:Label ID="lblNodeError" runat="server" Text="HiddenLabel" Visible="False" 
            ForeColor="Red"></asp:Label>
        <br />
        <br />
        <asp:Panel ID="pnlSearchBtns" runat="server">
            Search by:
            <asp:RadioButtonList ID="rdoSearchTerms" runat="server" 
            RepeatDirection="Horizontal">
                <asp:ListItem>Date Range</asp:ListItem>
                <asp:ListItem>Past</asp:ListItem>
            </asp:RadioButtonList> &nbsp;<asp:Button ID="btnSearch" runat="server" Text="Go!" />
        </asp:Panel>
        <asp:Panel ID="pnlDR" runat="server" Visible="False">
            <asp:Label ID="lblDR" runat="server" Text="Date Range: "></asp:Label>
            &nbsp;<asp:TextBox ID="txtDateFrom" runat="server"></asp:TextBox>
            &nbsp; to&nbsp;
            <asp:TextBox ID="txtDateTo" runat="server"></asp:TextBox>
        </asp:Panel>
        <asp:Panel ID="pnlPast" runat="server" Visible="False">
        <asp:Label ID="lblPast" runat="server" Text="Past: "></asp:Label>
                <asp:RadioButtonList ID="rdoPast" runat="server" 
                RepeatDirection="Horizontal">
                <asp:ListItem>Hour</asp:ListItem>
                <asp:ListItem>Day</asp:ListItem>
                <asp:ListItem>Week</asp:ListItem>
                <asp:ListItem>Month</asp:ListItem>
            </asp:RadioButtonList>
        </asp:Panel>
        <br />
        <asp:Panel ID="pnlGrid" runat="server" Visible="False">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                DataKeyNames="DataID" DataSourceID="SqlDataSource1">
                <Columns>
                    <asp:BoundField HeaderText="DataID" DataField="DataID" InsertVisible="False" 
                        ReadOnly="True" SortExpression="DataID" />
                    <asp:BoundField HeaderText="SensorID" DataField="SensorID" 
                        SortExpression="SensorID" />
                    <asp:BoundField HeaderText="Temp" DataField="Temp" SortExpression="Temp" />
                    <asp:BoundField HeaderText="Time" DataField="Time" SortExpression="Time" />
                    <asp:BoundField HeaderText="PctGood" DataField="PctGood" 
                        SortExpression="PctGood" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:WDTConnectionString %>" 
                SelectCommand="SELECT * FROM [DataHistory]"></asp:SqlDataSource>
        </asp:Panel>
        <br />
    <asp:Panel ID="pnlGraph" runat="server">
        <asp:Label ID="lblOut" runat="server"></asp:Label>
    </asp:Panel>
    </form>
    </body>
</head>
</html>
